package com.bonc.util.response;

/**
 * @Author:ChenZhiXiang
 * @Description:
 * @Date:Created in 14:29 2018/8/30
 * @Modified By:
 */
public enum CommResponseEnum implements IResponseEnum {

    SUCCESS(200,"操作成功"),
    FAILURE(0,"未知错误"),

    USER1(1001,"账号不符合规范"),
    USER2(1002,"验证码有误"),
    USER3(1003,"密码长度大于8位小于16位，必须包含字母、数字、特殊字符，且不能包含用户名"),
    USER4(1004,"用户或密码不能为空"),
    USER5(1005,"该用户不存在"),
    USER6(1006,"用户已删除"),
    USER7(1007,"用户已锁定,请次日再试"),
    USER8(1008,"密码错误"),
    //系统类型
    APIERROR1(4001,"缺少文件参数"),
    APIERROR2(4002,"解密失败"),
    APIERROR3(4003,"文件类型错误"),
    APIERROR4(4004,"文件下载失败"),
    APIERROR5(4005,"参数错误"),
    APIERROR6(4006,"输入包含敏感字符");

    private int code;
    private String msg;

    CommResponseEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String msg() {
        return this.msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
